import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import removeNoMatch from 'vite-plugin-router-warn'
import VueDevTools from 'vite-plugin-vue-devtools'
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig({
  preview: {
    port: 8080,
  },
  plugins: [
    vue(),
    VueDevTools(),
    AutoImport({
      imports: ['vue', 'vue-router'],
      dts: false,
    }),
    // 移除非必要的vue-router动态路由警告: No match found for location with path
    removeNoMatch(),
  ],
  resolve: {
    alias: {
      '@': '/src'
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        api:"modern-compiler"
      }
    }
  }
})
